INCLUDE_DIRECTORIES(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE( ${QT_USE_FILE} )

FILE(GLOB WORDS_DIC_SRC *.cpp)
SET(WORDS_DIC_HDR words_dicDlg.h)
SET(WORDS_DIC_UIS words_dic_Qt.ui)
SET(WORDS_DIC_RCS words_dic_Qt.qrc)

IF(WIN32)
  SET(WORDS_DIC_RC words_dic.rc)
ENDIF(WIN32)

ADD_DEFINITIONS(-DNL_WORDS_DIC_CFG="\\"${NL_ETC_PREFIX}/\\"")

SET( QT_USE_QT3SUPPORT TRUE)
SET( QT_USE_QTXML TRUE)

QT4_ADD_RESOURCES( WORDS_DIC_RC_SRCS ${WORDS_DIC_RCS} )
QT4_WRAP_UI( WORDS_DIC_UI_HDRS ${WORDS_DIC_UIS} )
QT4_WRAP_CPP( WORDS_DIC_MOC_SRCS ${WORDS_DIC_HDR})

ADD_EXECUTABLE(words_dic_qt ${WORDS_DIC_SRC} ${WORDS_DIC_MOC_SRCS} ${WORDS_DIC_RC_SRCS} ${WORDS_DIC_UI_HDRS} ${WORDS_DIC_RC})

TARGET_LINK_LIBRARIES(words_dic_qt ${QT_LIBRARIES} nelmisc)
NL_DEFAULT_PROPS(words_dic_qt "NeL, Tools, Misc: Qt Words Dic")
NL_ADD_RUNTIME_FLAGS(words_dic_qt)

ADD_DEFINITIONS(${QT_DEFINITIONS})

INSTALL(TARGETS words_dic_qt RUNTIME DESTINATION ${NL_BIN_PREFIX} COMPONENT toolsmisc)
INSTALL(FILES words_dic.cfg DESTINATION ${NL_ETC_PREFIX} COMPONENT toolsmisc)

